home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / xemacs.info-2 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  46.7 KB  |  1,116 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo-1.63
  2. from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: XEmacs under X,  Prev: Mode Line,  Up: Frame
  29.  
  30. Using XEmacs Under the X Window System
  31. ======================================
  32.  
  33.    XEmacs can be used with the X Window System and a window manager like
  34. MWM or TWM.  In that case, the X window manager opens, closes, and
  35. resizes XEmacs frames.  You use the window manager's mouse gestures to
  36. perform the operations.  Consult your window manager guide or reference
  37. manual for information on manipulating X windows.
  38.  
  39.    When you are working under X, each X window (that is, each XEmacs
  40. frame) has a menu bar for mouse-controlled operations (*note Pull-down
  41. Menus::.).
  42.  
  43.    XEmacs under X is also a multi-frame XEmacs.  You can use the New
  44. Frame menu item from the File menu to create a new XEmacs frame in a
  45. new X window from the same process.  The different frames will share the
  46. same buffer list, but you can look at different buffers in the different
  47. frames.
  48.  
  49.    The function `find-file-other-frame' is just like `find-file', but
  50. creates a new frame to display the buffer in first.  This is normally
  51. bound to `C-x 5 C-f', and is what the Open File, New Frame menu item
  52. does.
  53.  
  54.    The function `switch-to-buffer-other-frame' is just like
  55. `switch-to-buffer', but creates a new frame to display the buffer in
  56. first.  This is normally bound to `C-x 5 b'.
  57.  
  58.    You can specify a different default frame size other than the one
  59. provided.  Use the variable `default-frame-alist', which is an alist of
  60. default values for frame creation other than the first one.  These may
  61. be set in your init file, like this:
  62.  
  63.        (setq default-frame-alist '((width . 80) (height . 55)))
  64.  
  65.    For values specific to the first XEmacs frame, you must use X
  66. resources.  The variable `x-frame-defaults' takes an alist of default
  67. frame creation parameters for X window frames.  These override what is
  68. specified in `~/.Xdefaults' but are overridden by the arguments to the
  69. particular call to `x-create-frame'.
  70.  
  71.    When you create a new frame, the variable `create-frame-hook' is
  72. called with one argument, the frame just created.
  73.  
  74.    If you want to close one or more of the X windows you created using
  75. New Frame, use the Delete Frame menu item from the File menu.
  76.  
  77.    If you are working with multiple frames, some special information
  78. applies:
  79.    * Two variables, `frame-title-format' and `frame-icon-title-format'
  80.      determine the title of the frame and the title of the icon that
  81.      results if you shrink the frame.
  82.  
  83.    * The variables `auto-lower-frame' and `auto-raise-frame' position a
  84.      frame. If true, `auto-lower-frame' lowers a frame to the bottom
  85.      when it is no longer selected. If true, `auto-raise-frame' raises
  86.      a frame to the top when it is selected. Under X, most
  87.      ICCCM-compliant window managers will have options to do this for
  88.      you, but these variables are provided in case you are using a
  89.      broken window manager.
  90.  
  91.    * There is a new frame/modeline format directive, %S, which expands
  92.      to the name of the current frame (a frame's name is distinct from
  93.      its title; the name is used for resource lookup, among other
  94.      things, and the title is simply what appears above the window.)
  95.  
  96. 
  97. File: xemacs.info,  Node: Keystrokes,  Next: Pull-down Menus,  Prev: Frame,  Up: Top
  98.  
  99. Keystrokes, Key Sequences, and Key Bindings
  100. *******************************************
  101.  
  102. * Menu:
  103.  
  104. * Intro to Keystrokes::      Keystrokes as building blocks of key sequences.
  105. * Representing Keystrokes::  Using lists of modifiers and keysyms to
  106.                              represent keystrokes.
  107. * Key Sequences::            Combine key strokes into key sequences you can
  108.                              bind to commands.
  109. * String Key Sequences::     Available for upward compatibility.
  110. * Meta Key::                 Using ESC to represent Meta
  111. * Super and Hyper Keys::     Adding modifier keys on certain keyboards.
  112. * Character Representation:: How characters appear in Emacs buffers.
  113. * Commands::                 How commands are bound to key sequences.
  114.  
  115. 
  116. File: xemacs.info,  Node: Intro to Keystrokes,  Next: Representing Keystrokes,  Prev: Keystrokes,  Up: Keystrokes
  117.  
  118. Keystrokes as Building Blocks of Key Sequences
  119. ==============================================
  120.  
  121.    Earlier versions of Emacs used only the ASCII character set, which
  122. defines 128 different character codes.  Some of these codes are
  123. assigned graphic symbols like `a' and `='; the rest are control
  124. characters, such as `Control-a' (also called `C-a').  `C-a' means you
  125. hold down the CTRL key and then press `a'.
  126.  
  127.    Keybindings in XEmacs are not restricted to the set of keystrokes
  128. that can be represented in ASCII.  XEmacs can tell the difference
  129. between, for example, `Control-h', `Control-Shift-h', and `Backspace'.
  130.  
  131.    A keystroke is like a piano chord: you get it by simultaneously
  132. striking several keys.  To be more precise, a keystroke consists of a
  133. possibly empty set of modifiers followed by a single "keysym".  The set
  134. of modifiers is small; it consists of `Control', `Meta', `Super',
  135. `Hyper', and `Shift'.
  136.  
  137.    The rest of the keys on your keyboard, along with the mouse buttons,
  138. make up the set of keysyms.  A keysym is usually what is printed on the
  139. keys on your keyboard.  Here is a table of some of the symbolic names
  140. for keysyms:
  141. `a,b,c...'
  142.      alphabetic keys
  143.  
  144. `f1,f2...'
  145.      function keys
  146.  
  147. `button1'
  148.      left mouse button
  149.  
  150. `button2'
  151.      middle mouse button
  152.  
  153. `button3'
  154.      right mouse button
  155.  
  156. `button1up'
  157.      upstroke on the left mouse button
  158.  
  159. `button2up'
  160.      upstroke on the middle mouse button
  161.  
  162. `button3up'
  163.      upstroke on the right mouse button
  164.  
  165. `return'
  166.      Return key
  167.  
  168.    Use the variable `keyboard-translate-table' only if you are on a
  169. dumb tty, as it cannot handle input that cannot be represented as ASCII.
  170. The value of this variable is a string used as a translate table for
  171. keyboard input or `nil'.  Each character is looked up in this string
  172. and the contents used instead.  If the string is of length `n',
  173. character codes `N' and up are untranslated.  If you are running Emacs
  174. under X, you should do the translations with the `xmodmap' program
  175. instead.
  176.  
  177. 
  178. File: xemacs.info,  Node: Representing Keystrokes,  Next: Key Sequences,  Prev: Intro to Keystrokes,  Up: Keystrokes
  179.  
  180. Representing Keystrokes
  181. -----------------------
  182.  
  183.    XEmacs represents keystrokes as lists. Each list consists of an
  184. arbitrary combination of modifiers followed by a single keysym at the
  185. end of the list.  If the keysym corresponds to an ASCII character, you
  186. can use its character code.  (A keystroke may also be represented by an
  187. event object, as returned by the `read-key-sequence' function;
  188. non-programmers need not worry about this.)
  189.  
  190.    The following table gives some examples of how to list
  191. representations for keystrokes.  Each list consists of sets of
  192. modifiers followed by keysyms:
  193.  
  194. `(control a)'
  195.      Pressing CTRL and `a' simultaneously.
  196.  
  197. `(control ?a)'
  198.      Another way of writing the keystroke `C-a'.
  199.  
  200. `(control 65)'
  201.      Yet another way of writing the keystroke `C-a'.
  202.  
  203. `(break)'
  204.      Pressing the BREAK key.
  205.  
  206. `(control meta button2up)'
  207.      Release the middle mouse button, while pressing CTRL and META.
  208. Note: As you define keystrokes, you can use the `shift' key only as a
  209. modifier with characters that do not have a second keysym on the same
  210. key, such as `backspace' and `tab'.  It is an error to define a
  211. keystroke using the shift modifier with keysyms such as `a' and `='.
  212. The correct forms are `A' and `+'.
  213.  
  214. 
  215. File: xemacs.info,  Node: Key Sequences,  Next: String Key Sequences,  Prev: Representing Keystrokes,  Up: Keystrokes
  216.  
  217. Representing Key Sequences
  218. --------------------------
  219.  
  220.    A "complete key sequence" is a sequence of keystrokes that Emacs
  221. understands as a unit.  Key sequences are significant because you can
  222. bind them to commands.  Note that not all sequences of keystrokes are
  223. possible key sequences.  In particular, the initial keystrokes in a key
  224. sequence must make up a "prefix key sequence".
  225.  
  226.    Emacs represents a key sequence as a vector of keystrokes.  Thus, the
  227. schematic representation of a complete key sequence is as follows:
  228.  
  229.        [(modifier .. modifer keysym) ... (modifier .. modifier keysym)]
  230.  
  231.    Here are some examples of complete key sequences:
  232.  
  233. `[(control c) (control a)]'
  234.      Typing `C-c' followed by `C-a'
  235.  
  236. `[(control c) (control 65)]'
  237.      Typing `C-c' followed by `C-a'. (Using the ASCII code for the
  238.      character `a')
  239.  
  240. `[(control c) (break)]'
  241.      Typing `C-c' followed by the `break' character.
  242.  
  243.    A "prefix key sequence" is the beginning of a series of longer
  244. sequences that are valid key sequences; adding any single keystroke to
  245. the end of a prefix results in a valid key sequence.  For example,
  246. `control-x' is standardly defined as a prefix.  Thus there is a
  247. two-character key sequence starting with `C-x' for each valid
  248. keystroke, giving numerous possibilities.  Here are some samples:
  249.  
  250.    * `[(control x) (c)]'
  251.  
  252.    * `[(control x) (control c)]'
  253.  
  254.    Adding one character to a prefix key does not have to form a complete
  255. key.  It could make another, longer prefix.  For example, `[(control x)
  256. (\4)]' is itself a prefix that leads to any number of different
  257. three-character keys, including `[(control x) (\4) (f)]', `[(control x)
  258. (\4) (b)]' and so on.  It would be possible to define one of those
  259. three-character sequences as a prefix, creating a series of
  260. four-character keys, but we did not define any of them this way.
  261.  
  262.    By contrast, the two-character sequence `[(control f) (control k)]'
  263. is not a key, because the `(control f)' is a complete key sequence in
  264. itself.  You cannot give `[(control f (control k)]' an independent
  265. meaning as a command while `(control f)' is a complete sequence,
  266. because Emacs would understand C-f C-k as two commands.
  267.  
  268.    The predefined prefix key sequences in Emacs are `(control c)',
  269. `(control x)', `(control h)', `[(control x) (\4)]', and `escape'.  You
  270. can customize Emacs and could make new prefix keys or eliminate the
  271. default key sequences.  *Note Key Bindings::.  For example, if you
  272. redefine `(control f)' as a prefix, `[(control f) (control k)]'
  273. automatically becomes a valid key sequence (complete, unless you define
  274. it as a prefix as well).  Conversely, if you remove the prefix
  275. definition of `[(control x) (\4)]', `[(control x) (\4) (f)]' (or
  276. `[(control x) (\4) ANYTHING]') is no longer a valid key sequence.
  277.  
  278.    Note that the above paragraphs uses \4 instead of simply 4, because
  279. \4 is the symbol whose name is "4", and plain 4 is the integer 4, which
  280. would have been interpreted as the ASCII value.  Another way of
  281. representing the symbol whose name is "4" is to write ?4, which would be
  282. interpreted as the number 52, which is the ASCII code for the character
  283. "4".  We could therefore actually have written 52 directly, but that is
  284. far less clear.
  285.  
  286. 
  287. File: xemacs.info,  Node: String Key Sequences,  Next: Meta Key,  Prev: Key Sequences,  Up: Keystrokes
  288.  
  289. String Key Sequences
  290. --------------------
  291.  
  292.    For backward compatibility, you may also represent a key sequence
  293. using strings.  For example, we have the following equivalent
  294. representations:
  295.  
  296. `"\C-c\C-c"'
  297.      `[(control c) (control c)]'
  298.  
  299. `"\e\C-c"'
  300.      `[(meta control c)]'
  301.  
  302. 
  303. File: xemacs.info,  Node: Meta Key,  Next: Super and Hyper Keys,  Prev: String Key Sequences,  Up: Keystrokes
  304.  
  305. Assignment of the META Key
  306. --------------------------
  307.  
  308.    Not all terminals have the complete set of modifiers.  Terminals
  309. that have a Meta key allow you to type Meta characters by just holding
  310. that key down.  To type `Meta-a', hold down META and press `a'.  On
  311. those terminals, the META key works like the SHIFT key.  Such a key is
  312. not always labeled META, however, as this function is often a special
  313. option for a key with some other primary purpose.
  314.  
  315.    If there is no META key, you can still type Meta characters using
  316. two-character sequences starting with ESC.  To enter `M-a', you could
  317. type `ESC a'.  To enter `C-M-a', you would type `ESC C-a'.  ESC is
  318. allowed on terminals with Meta keys, too, in case you have formed a
  319. habit of using it.
  320.  
  321.    If you are running under X and do not have a META key, it is
  322. possible to reconfigure some other key to be a META key.  *Note Super
  323. and Hyper Keys::.
  324.  
  325.    Emacs believes the terminal has a META key if the variable
  326. `meta-flag' is non-`nil'.  Normally this is set automatically according
  327. to the termcap entry for your terminal type.  However, sometimes the
  328. termcap entry is wrong, and then it is useful to set this variable
  329. yourself.  *Note Variables::, for how to do this.
  330.  
  331.    Note: If you are running under the X window system, the setting of
  332. the `meta-flag' variable is irrelevant.
  333.  
  334. 
  335. File: xemacs.info,  Node: Super and Hyper Keys,  Next: Character Representation,  Prev: Meta Key,  Up: Keystrokes
  336.  
  337. Assignment of the SUPER and HYPER Keys
  338. --------------------------------------
  339.  
  340.    Most keyboards do not, by default, have SUPER or HYPER modifier
  341. keys.  Under X, you can simulate the SUPER or HYPER key if you want to
  342. bind keys to sequences using `super' and `hyper'.  You can use the
  343. `xmodmap' program to do this.
  344.  
  345.    For example, to turn your CAPS-LOCK key into a SUPER key, do the
  346. following:
  347.  
  348.    Create a file called `~/.xmodmap'.  In this file, place the lines
  349.  
  350.          remove Lock = Caps_Lock
  351.          keysym Caps_Lock = Super_L
  352.          add Mod2 = Super_L
  353.  
  354.    The first line says that the key that is currently called `Caps_Lock'
  355. should no longer behave as a "lock" key.  The second line says that
  356. this should now be called `Super_L' instead.  The third line says that
  357. the key called `Super_L' should be a modifier key, which produces the
  358. `Mod2' modifier.
  359.  
  360.    To create a META or HYPER key instead of a SUPER key, replace the
  361. word `Super' above with `Meta' or `Hyper'.
  362.  
  363.    Just after you start up X, execute the command `xmodmap /.xmodmap'.
  364. You can add this command to the appropriate initialization file to have
  365. the command executed automatically.
  366.  
  367.    If you have problems, see the documentation for the `xmodmap'
  368. program.  The X keyboard model is quite complicated, and explaining it
  369. is beyond the scope of this manual.  However, we reprint the following
  370. description from the X Protocol document for your convenience:
  371.  
  372.    A list of keysyms is associated with each keycode. If that list
  373. (ignoring trailing `NoSymbol' entries) is a single keysym `K', then the
  374. list is treated as if it were the list ```K NoSymbol K NoSymbol'''. If
  375. the list (ignoring trailing `NoSymbol' entries) is a pair of keysyms
  376. `K1 K2', then the list is treated as if it were the list ```K1 K2 K1
  377. K2'''. If the list (ignoring trailing `NoSymbol' entries) is a triple
  378. of keysyms `K1 K2 K3', then the list is treated as if it were the list
  379. ```K1 K2 K3 NoSymbol'''.
  380.  
  381.    The first four elements of the list are split into two groups of
  382. keysyms. Group 1 contains the first and second keysyms; Group 2 contains
  383. third and fourth keysyms. Within each group, if the second element of
  384. the group is NoSymbol, then the group should be treated as if the second
  385. element were the same as the first element, except when the first
  386. element is an alphabetic keysym `K' for which both lowercase and
  387. uppercase forms are defined. In that case, the group should be treated
  388. as if the first element were the lowercase form of `K' and the second
  389. element were the uppercase form of `K'.
  390.  
  391.    The standard rules for obtaining a keysym from a KeyPress event make
  392. use of only the Group 1 and Group 2 keysyms; no interpretation of other
  393. keysyms in the list is given here. (That is, the last four keysyms are
  394. unused.)
  395.  
  396.    Which group to use is determined by modifier state. Switching between
  397. groups is controlled by the keysym named `Mode_switch'. Attach that
  398. keysym to some keycode and attach that keycode to any one of the
  399. modifiers Mod1 through Mod5. This modifier is called the "group
  400. modifier". For any keycode, Group 1 is used when the group modifier is
  401. off, and Group 2 is used when the group modifier is on.
  402.  
  403.    Within a group, which keysym to use is also determined by modifier
  404. state. The first keysym is used when the `Shift' and `Lock' modifiers
  405. are off. The second keysym is used when the `Shift' modifier is on, or
  406. when the `Lock' modifier is on and the second keysym is uppercase
  407. alphabetic, or when the `Lock' modifier is on and is interpreted as
  408. `ShiftLock'. Otherwise, when the `Lock' modifier is on and is
  409. interpreted as `CapsLock', the state of the `Shift' modifier is applied
  410. first to select a keysym, but if that keysym is lower-case alphabetic,
  411. then the corresponding upper-case keysym is used instead.
  412.  
  413.    In addition to the above information on keysyms, we also provide the
  414. following description of modifier mapping from the InterClient
  415. Communications Conventions Manual:
  416.  
  417.    X11 supports 8 modifier bits, of which 3 are pre-assigned to
  418. `Shift', `Lock', and `Control'. Each modifier bit is controlled by the
  419. state of a set of keys, and these sets are specified in a table
  420. accessed by `GetModifierMapping()' and `SetModifierMapping()'.
  421.  
  422.    A client needing to use one of the pre-assigned modifiers should
  423. assume that the modifier table has been set up correctly to control
  424. these modifiers. The `Lock' modifier should be interpreted as `Caps
  425. Lock' or `Shift Lock' according to whether the keycodes in its
  426. controlling set include `XK_Caps_Lock' or `XK_Shift_Lock'.
  427.  
  428.    Clients should determine the meaning of a modifier bit from the
  429. keysyms being used to control it.
  430.  
  431.    A client needing to use an extra modifier, for example `Meta',
  432. should:
  433.  
  434.   1. Scan the existing modifier mappings.
  435.  
  436.        1. If it finds a modifier that contains a keycode whose set of
  437.           keysyms includes `XK_Meta_L' or `XK_Meta_R', it should use
  438.           that modifier bit.
  439.  
  440.        2. If there is no existing modifier controlled by `XK_Meta_L' or
  441.           `XK_Meta_R', it should select an unused modifier bit (one with
  442.           an empty controlling set) and:
  443.  
  444.   2. If there is a keycode with `XL_Meta_L' in its set of keysyms, add
  445.      that keycode to the set for the chosen modifier, and then:
  446.  
  447.        1. If there is a keycode with `XL_Meta_R' in its set of keysyms,
  448.           add that keycode to the set for the chosen modifier, and then:
  449.  
  450.        2. If the controlling set is still empty, interact with the user
  451.           to select one or more keys to be `Meta'.
  452.  
  453.   3. If there are no unused modifier bits, ask the user to take
  454.      corrective action.
  455.  
  456.    This means that the `Mod1' modifier does not necessarily mean
  457. `Meta', although some applications (such as twm and emacs 18) assume
  458. that. Any of the five unassigned modifier bits could mean `Meta'; what
  459. matters is that a modifier bit is generated by a keycode which is bound
  460. to the keysym `Meta_L' or `Meta_R'.
  461.  
  462.    Therefore, if you want to make a META key, the right way is to make
  463. the keycode in question generate both a `Meta' keysym and some
  464. previously-unassigned modifier bit.
  465.  
  466. 
  467. File: xemacs.info,  Node: Character Representation,  Next: Commands,  Prev: Super and Hyper Keys,  Up: Keystrokes
  468.  
  469. Representation of Characters
  470. ============================
  471.  
  472.    This section briefly discusses how characters are represented in
  473. Emacs buffers.  *Note Key Sequences:: for information on representing
  474. key sequences to create key bindings.
  475.  
  476.    ASCII graphic characters in Emacs buffers are displayed with their
  477. graphics.  LFD is the same as a newline character; it is displayed by
  478. starting a new line.  TAB is displayed by moving to the next tab stop
  479. column (usually every 8 spaces).  Other control characters are
  480. displayed as a caret (`^') followed by the non-control version of the
  481. character; thus, `C-a' is displayed as `^A'.  Non-ASCII characters 128
  482. and up are displayed with octal escape sequences; thus, character code
  483. 243 (octal), also called `M-#' when used as an input character, is
  484. displayed as `\243'.
  485.  
  486.    The variable `ctl-arrow' may be used to alter this behavior.  *Note
  487. Display Vars::.
  488.  
  489. 
  490. File: xemacs.info,  Node: Commands,  Prev: Character Representation,  Up: Keystrokes
  491.  
  492. Keys and Commands
  493. =================
  494.  
  495.    This manual is full of passages that tell you what particular keys
  496. do.  But Emacs does not assign meanings to keys directly.  Instead,
  497. Emacs assigns meanings to "functions", and then gives keys their
  498. meanings by "binding" them to functions.
  499.  
  500.    A function is a Lisp object that can be executed as a program.
  501. Usually it is a Lisp symbol that has been given a function definition;
  502. every symbol has a name, usually made of a few English words separated
  503. by dashes, such as `next-line' or `forward-word'.  It also has a
  504. "definition", which is a Lisp program.  Only some functions can be the
  505. bindings of keys; these are functions whose definitions use
  506. `interactive' to specify how to call them interactively.  Such
  507. functions are called "commands", and their names are "command names".
  508. More information on this subject will appear in the GNU Emacs Lisp
  509. Manual.
  510.  
  511.    The bindings between keys and functions are recorded in various
  512. tables called "keymaps".  *Note Key Bindings:: for more information on
  513. key sequences you can bind commands to.  *Note Keymaps:: for
  514. information on creating keymaps.
  515.  
  516.    When we say  "`C-n' moves down vertically one line" we are glossing
  517. over a distinction that is irrelevant in ordinary use but is vital in
  518. understanding how to customize Emacs.  The function `next-line' is
  519. programmed to move down vertically.  `C-n' has this effect because it
  520. is bound to that function.  If you rebind `C-n' to the function
  521. `forward-word' then `C-n' will move forward by words instead.
  522. Rebinding keys is a common method of customization.
  523.  
  524.    The rest of this manual usually ignores this subtlety to keep things
  525. simple.  To give the customizer the information needed, we often state
  526. the name of the command that really does the work in parentheses after
  527. mentioning the key that runs it.  For example, we will say that "The
  528. command `C-n' (`next-line') moves point vertically down," meaning that
  529. `next-line' is a command that moves vertically down and `C-n' is a key
  530. that is standardly bound to it.
  531.  
  532.    While we are on the subject of information for customization only,
  533. it's a good time to tell you about "variables".  Often the description
  534. of a command will say, "To change this, set the variable `mumble-foo'."
  535. A variable is a name used to remember a value.  Most of the variables
  536. documented in this manual exist just to facilitate customization: some
  537. command or other part of Emacs uses the variable and behaves
  538. differently depending on its setting.  Until you are interested in
  539. customizing, you can ignore the information about variables.  When you
  540. are ready to be interested, read the basic information on variables, and
  541. then the information on individual variables will make sense.  *Note
  542. Variables::.
  543.  
  544. 
  545. File: xemacs.info,  Node: Pull-down Menus,  Next: Entering Emacs,  Prev: Keystrokes,  Up: Top
  546.  
  547. XEmacs Pull-down Menus
  548. ======================
  549.  
  550.    If you are running XEmacs under X, a menu bar on top of the Emacs
  551. frame provides access to pull-down menus of file, edit, and
  552. help-related commands. The menus provide convenient shortcuts and an
  553. easy interface for novice users.  They do not provide additions to the
  554. functionality available via key commands; you can still invoke commands
  555. from the keyboard as in previous versions of Emacs.
  556.  
  557. File
  558.      Perform file and buffer-related operations, such as opening and
  559.      closing files, saving and printing buffers, as well as exiting
  560.      Emacs.
  561.  
  562. Edit
  563.      Perform standard editing operations, such as cutting, copying,
  564.      pasting, and killing selected text.
  565.  
  566. Apps
  567.      Access to sub-applications implemented within XEmacs, such as the
  568.      mail reader, the World Wide Web browser, the spell-checker, and
  569.      the calendar program.
  570.  
  571. Options
  572.      Control various options regarding the way XEmacs works, such as
  573.      controlling which elements of the frame are visible, selecting the
  574.      fonts to be used for text, specifying whether searches are
  575.      case-sensitive, etc.
  576.  
  577. Buffers
  578.      Present a menu of buffers for selection as well as the option to
  579.      display a buffer list.
  580.  
  581. Tools
  582.      Perform various actions designed to automate software development
  583.      and similar technical work, such as searching through many files,
  584.      compiling a program, and comparing or merging two or three files.
  585.  
  586. Help
  587.      Access to Emacs Info.
  588.  
  589.    There are two ways of selecting an item from a pull-down menu:
  590.  
  591.    * Select an item in the menu bar by moving the cursor over it and
  592.      click the left mouse-button.  Then move the cursor over the menu
  593.      item you want to choose and click left again.
  594.  
  595.    * Select an item in the menu bar by moving the cursor over it and
  596.      click and hold the left mouse-button.  With the mouse-button
  597.      depressed, move the cursor over the menu item you want, then
  598.      release it to make your selection.
  599.  
  600.    If a command in the pull-down menu is not applicable in a given
  601. situation, the command is disabled and its name appears faded.  You
  602. cannot invoke items that are faded.  For example, many commands on the
  603. Edit menu appear faded until you select text on which they are to
  604. operate; after you select a block of text, edit commands are enabled.
  605. *Note Mouse Selection:: for information on using the mouse to select
  606. text.  *Note Using X Selections:: for related information.
  607.  
  608.    There are also `M-x' equivalents for each menu item.  To find the
  609. equivalent for any left-button menu item, do the following:
  610.  
  611.   1. Type `C-h k' to get the `Describe Key' prompt.
  612.  
  613.   2. Select the menu item and click.
  614.  
  615.    Emacs displays the function associated with the menu item in a
  616. separate window, usually together with some documentation.
  617.  
  618. * Menu:
  619.  
  620. * File Menu::           Items on the File menu.
  621. * Edit Menu::           Items on the Edit menu.
  622. * Apps Menu::        Items on the Apps menu.
  623. * Options Menu::        Items on the Options menu.
  624. * Buffers Menu::        Information about the Buffers menu.
  625. * Tools Menu::        Items on the Tools menu.
  626. * Help Menu::           Items on the Help menu.
  627. * Menu Customization::  Adding and removing menu items and related
  628.                         operations.
  629.  
  630. 
  631. File: xemacs.info,  Node: File Menu,  Next: Edit Menu,  Up: Pull-down Menus
  632.  
  633. The File Menu
  634. -------------
  635.  
  636.    The File menu bar item contains the items New Frame, Open File...,
  637. Save Buffer, Save Buffer As..., Revert Buffer, Print Buffer, Delete
  638. Frame, Kill Buffer and Exit Emacs on the pull-down menu.  If you select
  639. a menu item, Emacs executes the equivalent command.
  640.  
  641. Open File, New Frame...
  642.      Prompts you for a filename and loads that file into a new buffer
  643.      in a new Emacs frame, that is, a new X window running under the
  644.      same Emacs process.  You can remove the frame using the Delete
  645.      Frame menu item.  When you remove the last frame, you exit Emacs
  646.      and are prompted for confirmation.
  647.  
  648. Open File...
  649.      Prompts you for a filename and loads that file into a new buffer.
  650.      Open File... is equivalent to the Emacs command `find-file' (`C-x
  651.      C-f').
  652.  
  653. Insert File...
  654.      Prompts you for a filename and inserts the contents of that file
  655.      into the current buffer.  The file associated with the current
  656.      buffer is not changed by this command.  This is equivalent to the
  657.      Emacs command `insert-file' (`C-x i').
  658.  
  659. Save Buffer
  660.      Writes and saves the current Emacs buffer as the latest version of
  661.      the current visited file.  Save Buffer is equivalent to the Emacs
  662.      command `save-buffer' (`C-x C-s').
  663.  
  664. Save Buffer As...
  665.      Writes and saves the current Emacs buffer to the filename you
  666.      specify.  Save Buffer As... is equivalent to the Emacs command
  667.      `write-file' (`C-x C-w').
  668.  
  669. Revert Buffer
  670.      Restores the last saved version of the file to the current buffer.
  671.      When you edit a buffer containing a text file, you must save the
  672.      buffer before your changes become effective.  Use Revert Buffer if
  673.      you do not want to keep the changes you have made in the buffer.
  674.      Revert Buffer is equivalent to the Emacs command `revert-file'
  675.      (`M-x revert-buffer').
  676.  
  677. Kill Buffer
  678.      Kills the current buffer, prompting you first if there are unsaved
  679.      changes.  This is roughly equivalent to the Emacs command
  680.      `kill-buffer' (`C-x k'), except that `kill-buffer' prompts for the
  681.      name of a buffer to kill.
  682.  
  683. Print Buffer
  684.      Prints a hardcopy of the current buffer.  Equivalent to the Emacs
  685.      command `print-buffer' (`M-x print-buffer').
  686.  
  687. New Frame
  688.      Creates a new Emacs frame displaying the `*scratch*' buffer.  This
  689.      is like the Open File, New Frame... menu item, except that it does
  690.      not prompt for or load a file.
  691.  
  692. Delete Frame
  693.      Allows you to close all but one of the frames created by New Frame.
  694.      If you created several Emacs frames belonging to the same Emacs
  695.      process, you can close all but one of them.  When you attempt to
  696.      close the last frame, Emacs informs you that you are attempting to
  697.      delete the last frame.  You have to choose Exit Emacs for that.
  698.  
  699. Split Frame
  700.      Divides the current window on the current frame into two
  701.      equal-sized windows, both displaying the same buffer.  Equivalent
  702.      to the Emacs command `split-window-vertically' (`C-x 2').
  703.  
  704. Un-split (Keep This)
  705.      If the frame is divided into multiple windows, this removes all
  706.      windows other than the selected one.  Equivalent to the Emacs
  707.      command `delete-other-windows' (`C-x 1').
  708.  
  709. Un-split (Keep Others)
  710.      If the frame is divided into multiple windows, this removes the
  711.      selected window from the frame, giving the space back to one of the
  712.      other windows.  Equivalent to the Emacs command `delete-window'
  713.      (`C-x 0').
  714.  
  715. Exit Emacs
  716.      Shuts down (kills) the Emacs process.  Equivalent to the Emacs
  717.      command `save-buffers-kill-emacs' (`C-x C-c').  Before killing the
  718.      Emacs process, the system asks which unsaved buffers to save by
  719.      going through the list of all buffers in that Emacs process.
  720.  
  721. 
  722. File: xemacs.info,  Node: Edit Menu,  Next: Apps Menu,  Prev: File Menu,  Up: Pull-down Menus
  723.  
  724. The Edit Menu
  725. -------------
  726.  
  727.    The Edit pull-down menu contains the Undo, Cut, Copy, Paste, and
  728. Clear menu items.  When you select a menu item, Emacs executes the
  729. equivalent command.  Most commands on the Edit menu work on a block of
  730. text, the X selection.  They appear faded until you select a block of
  731. text (activate a region) with the mouse.  *Note Using X Selections::,
  732. *note Killing::., and *note Yanking::. for more information.
  733.  
  734. Undo
  735.      Undoes the previous command.  Undo is equivalent to the Emacs
  736.      command `undo' (`C-x u').
  737.  
  738. Cut
  739.      Removes the selected text block from the current buffer, makes it
  740.      the X clipboard selection, and places it in the kill ring.  Before
  741.      executing this command, you have to select a region using Emacs
  742.      region selection commands or with the mouse.
  743.  
  744. Copy
  745.      Makes a selected text block the X clipboard selection, and places
  746.      it in the kill ring.  You can select text using one of the Emacs
  747.      region selection commands or by selecting a text region with the
  748.      mouse.
  749.  
  750. Paste
  751.      Inserts the current value of the X clipboard selection in the
  752.      current buffer.  Note that this is not necessarily the same as the
  753.      Emacs `yank' command, because the Emacs kill ring and the X
  754.      clipboard selection are not the same thing.  You can paste in text
  755.      you have placed in the clipboard using Copy or Cut.  You can also
  756.      use Paste to insert text that was pasted into the clipboard from
  757.      other applications.
  758.  
  759. Clear
  760.      Removes the selected text block from the current buffer but does
  761.      not place it in the kill ring or the X clipboard selection.
  762.  
  763. Start Macro Recording
  764.      After selecting this, Emacs will remember every keystroke you type
  765.      until End Macro Recording is selected.  This is the same as the
  766.      Emacs command `start-kbd-macro' (`C-x (').
  767.  
  768. End Macro Recording
  769.      Selecting this tells emacs to stop remembering your keystrokes.
  770.      This is the same as the Emacs command `end-kbd-macro' (`C-x )').
  771.  
  772. Execute Last Macro
  773.      Selecting this item will cause emacs to re-interpret all of the
  774.      keystrokes which were saved between selections of the Start Macro
  775.      Recording and End Macro Recording menu items.  This is the same as
  776.      the Emacs command `call-last-kbd-macro' (`C-x e').
  777.  
  778. 
  779. File: xemacs.info,  Node: Apps Menu,  Next: Options Menu,  Prev: Edit Menu,  Up: Pull-down Menus
  780.  
  781. The Apps Menu
  782. -------------
  783.  
  784.    The Apps pull-down menu contains the Read Mail (VM)..., Read Mail
  785. (MH)..., Send Mail..., Usenet News, Browse the Web, Gopher, Spell-Check
  786. Buffer and Emulate VI menu items, and the Calendar and Games sub-menus.
  787. When you select a menu item, Emacs executes the equivalent command.
  788. For some of the menu items, there are sub-menus which you will need to
  789. select.
  790.  
  791. 
  792. File: xemacs.info,  Node: Options Menu,  Next: Buffers Menu,  Prev: Apps Menu,  Up: Pull-down Menus
  793.  
  794. The Options Menu
  795. ----------------
  796.  
  797.    The Options pull-down menu contains the Read Only, Case Sensitive
  798. Search, Overstrike, Auto Delete Selection, Teach Extended Commands,
  799. Syntax Highlighting, Paren Highlighting, Font, Size, Weight, Buffers
  800. Menu Length..., Buffers Sub-Menus and Save Options menu items.  When
  801. you select a menu item, Emacs executes the equivalent command.  For
  802. some of the menu items, there are sub-menus which you will need to
  803. select.
  804.  
  805. Read Only
  806.      Selecting this item will cause the buffer to visit the file in a
  807.      read-only mode. Changes to the file will not be allowed. This is
  808.      equivalent to the Emacs command `toggle-read-only' (`C-x C-q').
  809.  
  810. Case Sensitive Search
  811.      Selecting this item will cause searches to be case-sensitive. If
  812.      its not selected then searches will ignore case. This option is
  813.      local to the buffer.
  814.  
  815. Overstrike
  816.      After selecting this item, when you type letters they will replace
  817.      existing text on a one-to-one basis, rather than pushing it to the
  818.      right. At the end of a line, such characters extend the line.
  819.      Before a tab, such characters insert until the tab is filled in.
  820.      This is the same as Emacs command `quoted-insert' (`C-q').
  821.  
  822. Auto Delete Selection
  823.      Selecting this item will cause automatic deletion of the selected
  824.      region. The typed text will replace the selection if the selection
  825.      is active (i.e. if its highlighted). If the option is not selected
  826.      then the typed text is just inserted at the point.
  827.  
  828. Teach Extended Commands
  829.      After you  select this item, any time you execute a command with
  830.      `M-x'which has a shorter keybinding, you will be shown the
  831.      alternate binding before the command executes.
  832.  
  833. Syntax Highlighting
  834.      You can customize your `.emacs' file to include the font-lock mode
  835.      so that when you select this item, the comments will be displayed
  836.      in one face, strings in another, reserved words in another, and so
  837.      on. When Fonts is selected, different parts of the program will
  838.      appear in different Fonts. When Colors is selected, then the
  839.      program will be displayed in different colors. Selecting None
  840.      causes the program to appear in just one Font and Color. Selecting
  841.      Less resets the Fonts and Colors to a fast, minimal set of
  842.      decorations. Selecting More resets the Fonts and Colors to a larger
  843.      set of decorations. For example, if Less is selected (which is the
  844.      default setting) then you might have all comments in green color.
  845.      Whereas, if More is selected then a function name in the comments
  846.      themselves might appear in a different Color or Font.
  847.  
  848. Paren Highlighting
  849.      After selecting Blink from this item, if you place the cursor on a
  850.      parenthesis, the matching parenthesis will blink. If you select
  851.      Highlight and place the cursor on a parenthesis, the whole
  852.      expression of the parenthesis under the cursor will be highlighted.
  853.      Selecting None will turn off the options (regarding Paren
  854.      Highlighting) which you had selected earlier.
  855.  
  856. Font
  857.      You can select any Font for your program by choosing from one of
  858.      the available Fonts.
  859.  
  860. Size
  861.      You can select any size ranging from 2 to 24 by selecting the
  862.      appropriate option.
  863.  
  864. Weight
  865.      You can choose either Bold or Medium for the weight.
  866.  
  867. Buffers Menu Length...
  868.      Prompts you for the number of buffers to display. Then it will
  869.      display that number of most recently selected buffers.
  870.  
  871. Buffers Sub-Menus
  872.      After selection of this item the Buffers menu will contain several
  873.      commands, as submenus of each buffer line. If this item is
  874.      unselected, then there are no submenus for each buffer line, the
  875.      only command available will be selecting that buffer.
  876.  
  877. Save Options
  878.      Selecting this item will save the current settings of your Options
  879.      menu to your `.emacs' file.
  880.  
  881. 
  882. File: xemacs.info,  Node: Buffers Menu,  Next: Tools Menu,  Prev: Options Menu,  Up: Pull-down Menus
  883.  
  884. The Buffers Menu
  885. ----------------
  886.  
  887.    The Buffers menu provides a selection of up to ten buffers and the
  888. item List All Buffers, which provides a Buffer List. *Note List
  889. Buffers:: for more information.
  890.  
  891. 
  892. File: xemacs.info,  Node: Tools Menu,  Next: Help Menu,  Prev: Buffers Menu,  Up: Pull-down Menus
  893.  
  894. The Tools Menu
  895. --------------
  896.  
  897.    The Tools pull-down menu contains the Grep..., Compile..., Shell
  898. Command..., Shell Command on Region..., Debug(GDB)...  and
  899. Debug(DBX)... menu items, and the Compare, Merge, Apply Patch and Tags
  900. sub-menus.  When you select a menu item, Emacs executes the equivalent
  901. command.  For some of the menu items, there are sub-menus which you
  902. will need to select.
  903.  
  904. 
  905. File: xemacs.info,  Node: Help Menu,  Next: Menu Customization,  Prev: Tools Menu,  Up: Pull-down Menus
  906.  
  907. The Help Menu
  908. -------------
  909.  
  910.    The Help Menu gives you access to Emacs Info and provides a menu
  911. equivalent for each of the choices you have when using `C-h'.  *Note
  912. Help:: for more information.
  913.  
  914.    The Help menu also gives access to UNIX online manual pages via the
  915. UNIX Manual Page option.
  916.  
  917. 
  918. File: xemacs.info,  Node: Menu Customization,  Prev: Help Menu,  Up: Pull-down Menus
  919.  
  920. Customizing XEmacs Menus
  921. ------------------------
  922.  
  923.    You can customize any of the pull-down menus by adding or removing
  924. menu items and disabling or enabling existing menu items.
  925.  
  926.    The following functions are available:
  927. `add-menu: (MENU-PATH MENU-NAME MENU-ITEMS &OPTIONAL BEFORE)'
  928.      Add a menu to the menu bar or one of its submenus.
  929.  
  930. `add-menu-item: (MENU-PATH ITEM-NAME FUNCTION ENABLED-P
  931.      &optional before)' Add a menu item to a menu, creating the menu
  932.      first if necessary.
  933.  
  934. `delete-menu-item: (PATH)'
  935.      Remove the menu item defined by PATH from the menu hierarchy.
  936.  
  937. `disable-menu-item: (PATH)'
  938.      Disable the specified menu item.
  939.  
  940. `enable-menu-item: (PATH)'
  941.      Enable the specified previously disabled menu item.
  942.  
  943. `relabel-menu-item: (PATH NEW-NAME)'
  944.      Change the string of the menu item specified by PATH to NEW-NAME.
  945.  
  946.    Use the function `add-menu' to add a new menu or submenu.  If a menu
  947. or submenu of the given name exists already, it is changed.
  948.  
  949.    MENU-PATH identifies the menu under which the new menu should be
  950. inserted.  It is a list of strings; for example, `("File")' names the
  951. top-level File menu.  `("File" "Foo")' names a hypothetical submenu of
  952. File.  If MENU-PATH is `nil', the menu is added to the menu bar itself.
  953.  
  954.    MENU-NAME is the string naming the menu to be added.
  955.  
  956.    MENU-ITEMS is a list of menu item descriptions.  Each menu item
  957. should be a vector of three elements:
  958.  
  959.    * A string, which is the name of the menu item
  960.  
  961.    * A symbol naming a command, or a form to evaluate
  962.  
  963.    * `t' or `nil' to indicate whether the item is selectable
  964.  
  965.    The optional argument BEFORE is the name of the menu before which
  966. the new menu or submenu should be added.  If the menu is already
  967. present, it is not moved.
  968.  
  969.    The function `add-menu-item' adds a menu item to the specified menu,
  970. creating the menu first if necessary.  If the named item already
  971. exists, the menu remains unchanged.
  972.  
  973.    MENU-PATH identifies the menu into which the new menu item should be
  974. inserted.  It is a list of strings; for example, `("File")' names the
  975. top-level File menu.  `("File" "Foo")' names a hypothetical submenu of
  976. File.
  977.  
  978.    ITEM-NAME is the string naming the menu item to add.
  979.  
  980.    FUNCTION is the command to invoke when this menu item is selected.
  981. If it is a symbol, it is invoked with `call-interactively', in the same
  982. way that functions bound to keys are invoked.  If it is a list, the
  983. list is simply evaluated.
  984.  
  985.    ENABLED-P controls whether the item is selectable or not.  It should
  986. be `t', `nil', or a form to evaluate to decide.  This form will be
  987. evaluated just before the menu is displayed, and the menu item will be
  988. selectable if that form returns non-`nil'.
  989.  
  990.    For example, to make the `rename-file' command available from the
  991. File menu, use the following code:
  992.  
  993.      (add-menu-item '("File") "Rename File" 'rename-file t)
  994.  
  995.    To add a submenu of file management commands using a File Management
  996. item, use the following code:
  997.  
  998.      (add-menu-item '("File" "File Management") "Copy File" 'copy-file t)
  999.      (add-menu-item '("File" "File Management") "Delete File" 'delete-file t)
  1000.      (add-menu-item '("File" "File Management") "Rename File" 'rename-file t)
  1001.  
  1002.    The optional BEFORE argument is the name of a menu item before which
  1003. the new item should be added.  If the item is already present, it is
  1004. not moved.
  1005.  
  1006.    To remove a specified menu item from the menu hierarchy, use
  1007. `delete-menu-item'.
  1008.  
  1009.    PATH is a list of strings that identify the position of the menu
  1010. item in the menu hierarchy.  `("File" "Save")' means the menu item
  1011. called Save under the top level File menu.  `("Menu" "Foo" "Item")'
  1012. means the menu item called Item under the Foo submenu of Menu.
  1013.  
  1014.    To disable a menu item, use `disable-menu-item'.  The disabled menu
  1015. item is grayed and can no longer be selected.  To make the item
  1016. selectable again, use `enable-menu-item'.  `disable-menu-item' and
  1017. `enable-menu-item' both have the argument PATH.
  1018.  
  1019.    To change the string of the specified menu item, use
  1020. `relabel-menu-item'. This function also takes the argument PATH.
  1021.  
  1022.    NEW-NAME is the string to which the menu item will be changed.
  1023.  
  1024. 
  1025. File: xemacs.info,  Node: Entering Emacs,  Next: Exiting,  Prev: Pull-down Menus,  Up: Top
  1026.  
  1027. Entering and Exiting Emacs
  1028. **************************
  1029.  
  1030.    The usual way to invoke Emacs is to type `emacs RET' at the shell
  1031. (for XEmacs, type `xemacs RET').  Emacs clears the screen and then
  1032. displays an initial advisory message and copyright notice.  You can
  1033. begin typing Emacs commands immediately afterward.
  1034.  
  1035.    Some operating systems insist on discarding all type-ahead when Emacs
  1036. starts up; they give Emacs no way to prevent this.  Therefore, it is
  1037. wise to wait until Emacs clears the screen before typing the first
  1038. editing command.
  1039.  
  1040.    Before Emacs reads the first command, you have not had a chance to
  1041. give a command to specify a file to edit.  Since Emacs must always have
  1042. a current buffer for editing, it presents a buffer, by default, a
  1043. buffer named `*scratch*'.  The buffer is in Lisp Interaction mode; you
  1044. can use it to type Lisp expressions and evaluate them, or you can
  1045. ignore that capability and simply doodle.  You can specify a different
  1046. major mode for this buffer by setting the variable `initial-major-mode'
  1047. in your init file.  *Note Init File::.
  1048.  
  1049.    It is possible to give Emacs arguments in the shell command line to
  1050. specify files to visit, Lisp files to load, and functions to call.
  1051.  
  1052. 
  1053. File: xemacs.info,  Node: Exiting,  Next: Command Switches,  Prev: Entering Emacs,  Up: Top
  1054.  
  1055. Exiting Emacs
  1056. =============
  1057.  
  1058.    There are two commands for exiting Emacs because there are two kinds
  1059. of exiting: "suspending" Emacs and "killing" Emacs.  "Suspending" means
  1060. stopping Emacs temporarily and returning control to its superior
  1061. (usually the shell), allowing you to resume editing later in the same
  1062. Emacs job, with the same files, same kill ring, same undo history, and
  1063. so on.  This is the usual way to exit.  "Killing" Emacs means
  1064. destroying the Emacs job.  You can run Emacs again later, but you will
  1065. get a fresh Emacs; there is no way to resume the same editing session
  1066. after it has been killed.
  1067.  
  1068. `C-z'
  1069.      Suspend Emacs (`suspend-emacs').  If used under the X window
  1070.      system, shrink the X window containing the Emacs frame to an icon
  1071.      (see below).
  1072.  
  1073. `C-x C-c'
  1074.      Kill Emacs (`save-buffers-kill-emacs').
  1075.  
  1076.    If you use XEmacs under the X window system, `C-z' shrinks the X
  1077. window containing the Emacs frame to an icon.  The Emacs process is
  1078. stopped temporarily, and control is returned to the window manager.  If
  1079. more than one frame is associated with the Emacs process, only the
  1080. frame from which you used `C-z' is retained.  The X windows containing
  1081. the other Emacs frames are closed.
  1082.  
  1083.    To activate the "suspended" Emacs, use the appropriate window manager
  1084. mouse gestures.  Usually left-clicking on the icon reactivates and
  1085. reopens the X window containing the Emacs frame, but the window manager
  1086. you use determines what exactly happens.  To actually kill the Emacs
  1087. process, use `C-x C-c' or the Exit Emacs item on the File menu.
  1088.  
  1089.    On systems that do not permit programs to be suspended, `C-z' runs
  1090. an inferior shell that communicates directly with the terminal, and
  1091. Emacs waits until you exit the subshell.  On these systems, the only way
  1092. to return to the shell from which Emacs was started (to log out, for
  1093. example) is to kill Emacs.  `C-d' or `exit' are typical commands to
  1094. exit a subshell.
  1095.  
  1096.    To kill Emacs, type `C-x C-c' (`save-buffers-kill-emacs').  A
  1097. two-character key is used for this to make it harder to type.  In
  1098. XEmacs, selecting the Exit Emacs option of the File menu is an
  1099. alternate way of issuing the command.
  1100.  
  1101.    Unless a numeric argument is used, this command first offers to save
  1102. any modified buffers.  If you do not save all buffers, you are asked for
  1103. reconfirmation with `yes' before killing Emacs, since any changes not
  1104. saved will be lost.  If any subprocesses are still running, `C-x C-c'
  1105. asks you to confirm killing them, since killing Emacs kills the
  1106. subprocesses simultaneously.
  1107.  
  1108.    In most programs running on Unix, certain characters may instantly
  1109. suspend or kill the program.  (In Berkeley Unix these characters are
  1110. normally `C-z' and `C-c'.)  This Unix feature is turned off while you
  1111. are in Emacs. The meanings of `C-z' and `C-x C-c' as keys in Emacs were
  1112. inspired by the standard Berkeley Unix meanings of `C-z' and `C-c', but
  1113. that is their only relationship with Unix.  You could customize these
  1114. keys to do anything (*note Keymaps::.).
  1115.  
  1116.